#!/bin/sh

eurekaUrl=$1
applicationName=$2
port=$3
timeout=$4
serverIP=${hostIps}

servers=`awk 'BEGIN{list="'${serverIP}'";split(list,ip_list,",");for(ip in ip_list){print ip_list[ip];}}'`
	for server in ${servers[*]}
	do
		echo $server
		curl -v -X PUT ${eurekaUrl}/eureka/apps/${applicationName}/$server:${port}/status?value=OUT_OF_SERVICE
	done
echo 'sleep' ${timeout}
sleep ${timeout}